﻿@using QDT.Core.Projects
@using InputType = QDT.Common.InputType

@model QDT.Common.IPagedList<QDT.Core.Projects.ProjectFeild>
@{
    var type = ViewData["ProjectType"] as ProjectType;
}

<div class="main_title">
    
    "@type.Name" 扩展属性列表 <a href="@Url.Action("Index", "ProjectType")" class="back_list">返回分类列表</a>

</div>
<div class="blank5">
</div>
<div class="button_row">
    
    <a class="button" href="@Url.Action("AddFeild", new { cateID = type.ID })">新增</a> 

    <a class="button" href="javascript: deleteMethod('','DeleteFeild')">彻底删除</a>

</div>
<div class="blank5">
</div>
<div class="grid_box">
    <div class="grid_top">
    </div>
    @Html.Grid(Model).Columns(column =>
                                  {
                                      column.CheckBox(x => x.ID);
                                      column.For(x => x.Name).Named("字段名称");
                                      column.For(x => x.ShowName).Named("字段显示名称");
                                      column.For(x => InputType.GetName(x.InputType)).Named("字段类型").Sortable(false);
                                      column.For(x => x.IsRequire ? "是" : "否").Named("是否必填").SortColumnName("IsRequire");
                                      column.For(x => x.IsEffect ? "有效" : "无效").Named("状态").SortColumnName("IsEffect");
                                      column.For(x => x.Sort).Named("排序").SortColumnName("Sort"); ;
                                      column.Buttons(btns => btns.Add(x => Html.ActionLink("编辑", "EditFeild", new { id = x.ID }))
                                                                 .Add(x => Html.ScriptLink("彻底删除", "deleteMethod({0},'{1}')", x.ID, "DeleteFeild"))
                                          );
                                  }).Complex(ViewData)
    <div class="grid_foot">
    </div>
</div>
<div class="blank5">
</div>
@Html.Pager(Model)
